package com.example.administrator.foodrowfresh.configs.classifyconfing.classifyentity;

import java.util.Comparator;

/**
 * Created by lqr on 2016/5/3.
 */
public class ScalesEntity implements Comparable {
    int scales;






    public int getScales() {
        return scales;
    }

    public void setScales(int scales) {
        this.scales = scales;
    }

    @Override
    public int compareTo(Object another) {

        if(another instanceof ScalesEntity){
            ScalesEntity stu = (ScalesEntity)another;
            //比较后的结果：  相等：0               前面>后面:正数            前面<后面：负数
            return this.scales - stu.scales;
        }
        return 0;

    }

    @Override
    public String toString() {
        return "ScalesEntity{" +
                "scales=" + scales +
                '}';
    }
}
